Xbasic

RIGHT Function

Syntax

Output_String as C = RIGHT(C,N number_of_characters)

Arguments

C

A character string.

number_of_characters

The number of characters to return. Numeric

Description

Returns a portion of a string starting with the rightmost character.

Discussion

RIGHT() returns a character string containing the specified number_of_characters starting from the C string 's right-most character.

Example

right(LASTNAME, 4) -> "   " (4 blanks), if LASTNAME is a 10-character field containing "Smith"
right(trim(CITY), 7) -> "chester", if CITY contains "Winchester"

See Also